<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet  [
	<!ENTITY nbsp   "&#160;">
	<!ENTITY agrave "&#224;">
	<!ENTITY egrave "&#232;">
	<!ENTITY eacute "&#233;">
	<!ENTITY ocirc	"&#244;">
	<!ENTITY copy   "&#169;">
	<!ENTITY reg    "&#174;">
	<!ENTITY trade  "&#8482;">
	<!ENTITY mdash  "&#8212;">
	<!ENTITY ldquo  "&#8220;">
	<!ENTITY rdquo  "&#8221;"> 
	<!ENTITY pound  "&#163;">
	<!ENTITY yen    "&#165;">
	<!ENTITY euro   "&#8364;">
]>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:bw="http://tice2.univ-reunion.fr/babelweb" xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xmlns="http://www.w3.org/1999/xhtml">
	
	<xsl:import href="manifest-manager.xsl"/>
	<xsl:import href="babel-transform-fly.xsl"/>

	<xsl:output method="xhtml" indent="yes" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
		doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>

	<xsl:template match="/">
		<xsl:comment>The transformation will generate html files whose names will match the ids of
			the assessments. </xsl:comment>

		<xsl:for-each select="//assessmentItem">
			<!--<xsl:variable name="modulename" select="substring(./@module,1,2)"/>
			<xsl:variable name="modulelang" select="./@lang"/>-->
			<!--<xsl:variable name="filename" select="concat('content/',@identifier,'.html')"/>-->
			<xsl:variable name="modulename">
				<xsl:choose>
					<xsl:when test="substring(@module,1,3) = 'm10'">m10</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="substring(@module,1,2)"/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:variable>
			<xsl:variable name="filename" select="concat('../course_html/',$modulename,'/',@lang,'/',@identifier,'.html')"/>
			
			<xsl:result-document href="{$filename}">
				<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
					<head>
						<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
						<link href="/babel-data/styles/base/style.css" rel="stylesheet" type="text/css"/>
						
						<!--[if IE]>
							<link rel="stylesheet" href="<?php echo $this->baseurl ?>/sources/styles/ie_fixes.css" type="text/css" />
						<![endif]-->

						<!--<script type="text/javascript" src="/babel-data/scripts/jquery-1.3.1.min.js"></script>
						<script type="text/javascript" src="/babel-data/scripts/jquery-ui-personalized-1.6rc6.min.js"></script>-->
						<script type="text/javascript" src="/babel-data/scripts/jquery-1.3.2.min.js"></script>
						<script type="text/javascript" src="/babel-data/scripts/jquery-ui-1.7.2.custom.min.js"></script>
						<script type="text/javascript" src="/babel-data/scripts/jquery.dimensions.pack.js"></script>
						<script type="text/javascript" src="/babel-data/scripts/jquery.tooltip.pack.js"></script>
						<script type="text/javascript" src="/babel-data/scripts/jquery.draw.js"></script>
						<script type="text/javascript" src="/babel-data/scripts/jquery.jHelperTip.1.0.min.js"></script>
						<script type="text/javascript" src="/babel-data/scripts/jquery.selectboxes.js"></script>
						<script type="text/javascript" src="/babel-data/scripts/custom_popup.js"></script>
						
						<script type="text/javascript" src="/babel-data/scripts/activities_builder.js"></script>
						
						<script type="text/css" rel="stylesheet">
						</script>

						<title>BabelWEB : <xsl:value-of select="@title"/></title>
					</head>
					<body style="margin:5px;">
						<xsl:call-template name="page-navigation-fil"/>
						<div id="global">
							<h2 id="exotitle"><xsl:value-of select="@title"/></h2>
							<xsl:call-template name="run">
								<xsl:with-param name="correct-answers" select="responseDeclaration"/>
								<xsl:with-param name="content" select="itemBody"/>
							</xsl:call-template>
						</div>
					</body>
				</html>
				
			</xsl:result-document>
		</xsl:for-each>
	</xsl:template>



</xsl:stylesheet>
